package frame.base;

/**
 * @author PeiWentao
 * 查询对象
 */
public abstract class BaseQo {

    /**数据有效性 默认查询有效数据*/
    private Byte valid = 1;

    /**默认的排序*/
    private String orderStr = "1 ASC";
    /**
     * PagerHelper插件参数：size
     * @return page 美页xx条
     */
    public abstract int size();
    /**
     * PagerHelper插件参数：page
     * @return page 第xx页
     */
    public abstract int page();

    public Byte getValid() {
        return valid;
    }

    public BaseQo setValid(Byte valid) {
        this.valid = valid;
        return this;
    }

    public String getOrderStr() {
        return orderStr;
    }

    public BaseQo setOrderStr(String orderStr) {
        this.orderStr = orderStr;
        return this;
    }

    public int getPage() {
        return page();
    }
    public int getSize() {
        return size();
    }
}
